package com.dsiab.portalService.service.impl;

import com.dsiab.portalService.entity.PromoteDto;
import com.dsiab.portalService.mapper.PromoteDao;
import com.dsiab.portalService.service.PromoteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class PromoteServiceImpl implements PromoteService {

  @Autowired
  PromoteDao promoteDao;


  public List<PromoteDto> getList(int page) {
    return promoteDao.getList(page);
  }

  public int getListTotal() {
    return promoteDao.getListTotal();
  }

  public Object getDetail(String id){
    return promoteDao.getDetail(id);
  }

  public void updateViews(int pid){
    promoteDao.updateViews(pid);
  }

  public List<PromoteDto> getRecommend() {
    return promoteDao.getRecommend();
  }


}